package com.yurun.service;

import com.yurun.entity.Article;
import com.yurun.model.vo.CategoryArticleCount;
import com.yurun.model.vo.PageResult;
import com.yurun.model.vo.article.ArticleInfo;
import com.yurun.model.vo.article.ArticleInfoArticleshow;
import com.yurun.model.vo.article.ArticleInfoHomeshow;

import java.util.List;

public interface ArticleService {

    void addArticle(Article article);

    void deleteArticleById(Long id);

    void updateArticleTopById(Long id,Boolean isTop);

    void updateArticleViewsById(Long id,Integer views);

    void updateArticle(Article article);

    PageResult<ArticleInfo> getAllArticleInfoList(Integer pageNum);                     // -- 用于后台-文章管理 页面

    PageResult<ArticleInfo> getArticleInfoListByCategory(Integer category_id,Integer pageNum);

    PageResult<ArticleInfo> getArticleInfoListByTitle(String title,Integer pageNum);

    PageResult<ArticleInfoHomeshow> getArticleInfoHomeshowList(Integer pageNum);        // -- 用于第一级页面文章信息搜索

    PageResult<ArticleInfoArticleshow> getArticleInfoArticleshowList(Integer pageNum);  // -- 用于第二级页面文章信息搜索

    List<String> getGroupYearMonthList();

    List<ArticleInfoArticleshow> getArticleListByCategory(Integer category_id);

    Article getArticleById(Integer id);                                   // -- 获取文章内容

    int getCountOfArticle();

    int getCountOfArticleByCategoryId(Integer categoryId);

    List<CategoryArticleCount> getCountListOfArticleAboutCategory();// -- 获取每个分类名下的文章数量
}
